<template>
  <div class="inform">
    <div class="informFormation">内容查看</div>
    <div class="close" @click="close"><i class="el-icon-circle-close"></i></div>
    <div class="inform-content" :style="imgStyle">
      <div class="nei">{{ item.content }}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "inform",
  props: ["item"],
  inject: ["reload"],
  data() {
    return {
      imgStyle: {
        backgroundImage: `url(${require("@/assets/images/inform.jpeg")})`,
      },
      read: null,
    };
  },
  methods: {
    //关闭
    close() {
      this.$emit("update:visible", false);
      this.reload()
    },
  },
};
</script>

<style lang="less" scoped>
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.inform {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  padding: 23px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  z-index: 9999;
  .close {
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 10px;
  }
  .informFormation {
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
  }
  .inform-content {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    padding: 10px;
    .nei {
      height: 550px;
      border-radius: 10px;
      padding: 15px;
      overflow: auto;
      background-color: rgba(255, 255, 255, 0.5);
    }
  }
}
</style>